<!--Begin All-->
    <div class="d_all">
		<!--Menu-->
                    <div class="tt_menu_2">
                    	<div class="pl20 pt10">
                            <?php echo $this->NewsCat(); ?>
                         </div>
                            <?php echo $this->render('/search_news.phtml'); ?>
                    </div>
                    
        <!--End Menu-->
    
    <!--Begin Contents-->
    <div class="d_contents_wrap_2">
    	<div class="d_space_height_10"></div>
		
        <!-- Left -->
        <div class="dd_ctsp">
        
        <?php 
            $news = new Default_Model_News();
            $product = new AdminDthink_Model_Product();
            $content = preg_replace('/\s+/', ' ', $this->data['news_plaintext']);
            $content = $product->cut_string($content, 600, 1);
        ?>
        <!-- Kênh tin-->
            <div class="ttct_top">
                <div class="pl20"><?php echo $this->cat_name; ?></div>
            </div>
            
            <div class="dd_ctsp_mid">
                <div class="news_details">
                    <div class="news_title_details">
                        <a><?php echo $this->data['news_title']; ?></a>
                    </div>
                    
                    <div class="create_date_details">
                        <?php 
                        $sqldate = strtotime($this->data['create_date']);
                        $create_date = date('d/m/Y, H:i', $sqldate);
                        echo $this->day . ', ' .$create_date; 
                        ?> GMT+7
                    </div>
                    
                    <div class="news_content_details">
                        <?php echo $this->data['news_content']; ?>
                    </div>
                        <script> 
                          FB.init({appId: "394487913951162", status: true, cookie: true});
                    
                          function postToFeed() {
                    
                            // calling the API ...
                            var obj = {
                              method: 'feed',
                              link: '<?php echo 'http://localhost:81' . $this->userAgent()->getServerValue('request_uri'); ?>',
                              picture: 'http://www.umarket.vn/public/files/news/<?php echo $this->data['news_image']; ?>',
                              caption: '<?php echo $this->cat_name; ?>',
                              name: '<?php echo $this->data['news_title']; ?>',
                              description: '<?php echo $content; ?>'
                            };
                    
                            function callback(response) {
                              document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
                            }
                    
                            FB.ui(obj, callback);
                          }
                        </script>
                    
                    <div class="like_button">
                        <a style="display: block; cursor: pointer; width: 20px;" onclick='postToFeed(); return false;'><img src="<?php echo $this->baseUrl('/public/files/Facebook_icon.png'); ?>" /></a>
                    </div>                    
                    
                    <div class="like_button">
                        <a href="https://plus.google.com/share?url=<?php echo 'http://localhost:81' . $this->userAgent()->getServerValue('request_uri'); ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img style="width: 20px; height: 20px;" src="https://www.gstatic.com/images/icons/gplus-32.png" alt="Share on Google+"/></a>
                    </div>
                    
                    <div class="like_button">
                        <div class="g-plusone" data-size="medium" data-href="<?php echo 'http://localhost:81' . $this->userAgent()->getServerValue('request_uri'); ?>"></div>
                    </div>
                    
                    <div class="like_button" style="margin-left: 0;">
                        <fb:like send="false" layout="button_count" width="150" show_faces="true" font="arial"></fb:like>
                    </div>
                    
                    
                </div>
            </div>
        <!-- End Kenh Tin -->
        <div class="dd_ctsp_bot"></div>
        </div>
        <!-- End Left -->    